package com.itheima.tlias.service.impl;

import com.itheima.tlias.mapper.DeptMapper;
import com.itheima.tlias.pojo.entity.Dept;
import com.itheima.tlias.service.TestInsertDeptServiceTwo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
@Service
public class TestInsertDeptServiceTwoImpl implements TestInsertDeptServiceTwo {
    @Resource
    private DeptMapper deptMapper;

    @Override
    public int insertDeptTwo() {
        Dept dept = new Dept();
        dept.setName("测试传播Two");
        dept.setUpdateTime(LocalDateTime.now());
        dept.setCreateTime(LocalDateTime.now());
        deptMapper.insertDept(dept);
        System.out.println(1/0);
        return 0;
    }
}
